package com.xyzh.stj.web.dao;

import com.xyzh.stj.web.dto.user.QueryUserPageDTO;
import com.xyzh.stj.web.entity.UserEntity;
import com.xyzh.stj.web.vo.user.UserOrganizationVo;
import com.xyzh.application.base.dao.BasicMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * <p>
 * Mapper 接口
 * </p>
 *
 * @author @JZB
 * @since 2023-10-29
 */
public interface UserInfoMapper extends BasicMapper<UserEntity> {

    List<UserOrganizationVo> getUserLitsByParentOrganizationid(@Param("organizationId") String organizationId);

    List<UserOrganizationVo> getUsersByPorgIdPage(@Param("query") QueryUserPageDTO query,
                                                  @Param("offset") long offset,
                                                  @Param("limit") long size
    );

    List<UserOrganizationVo> getUsersNoOrgPage(@Param("query") QueryUserPageDTO query,
                                               @Param("offset") long offset,
                                               @Param("limit") long size);

    long getUsersCountByPorgId(@Param("query") QueryUserPageDTO query);

    long getUsersCount(@Param("query") QueryUserPageDTO query);

    List<UserOrganizationVo> queryUserList(@Param("query") QueryUserPageDTO query,
                                           @Param("offset") long offset,
                                           @Param("limit") long size);

    long queryTotalList(@Param("query") QueryUserPageDTO query);
}
